﻿#ifndef EVENTFILTER_H
#define EVENTFILTER_H
#include <functional>
#include<QObject>
class QEvent;
//窗口大小改变事件过滤器
class EventFilter :public QObject
{
public:
	EventFilter(std::function<bool(QEvent* ev)> fun,const int EventType, QObject* parent = nullptr);
	bool eventFilter(QObject* object, QEvent* ev)override;
protected:
	std::function<bool(QEvent* ev)> m_fun;
	int m_EventType = 0;
};
#endif 